package com.wrupple.muba.catalogs.client.module.services.logic.impl;

import com.google.gwt.event.shared.EventBus;
import com.wrupple.muba.catalogs.client.events.catalog.EntryUpdatedEvent;
import com.wrupple.muba.catalogs.domain.CatalogEntry;
import com.wrupple.muba.common.client.application.DataCallback;

public class EntryUpdateServiceHook extends DataCallback<CatalogEntry> {
	EventBus eventBus;
	
	
	public EntryUpdateServiceHook(EventBus eventBus) {
		super();
		this.eventBus = eventBus;
	}


	@Override
	public void execute() {
		if (result != null) {
			EntryUpdatedEvent event = new EntryUpdatedEvent(result);
			eventBus.fireEvent(event);
		}
	}

}
